package com.greateamd.timetableasy.server.dao;

import java.io.Serializable;
import java.sql.SQLException;
import java.util.List;

import org.hibernate.HibernateException;

public interface IBaseDao<T, ID extends Serializable> {
    public List<T> getAll()throws HibernateException,SQLException;
    public T getById(ID id)throws HibernateException,SQLException;
    public Integer getRowCount()throws HibernateException,SQLException;
    public void save(T obj) throws HibernateException,SQLException;
    public void save(List<T> obj) throws HibernateException,SQLException;
    public void update(T obj)throws HibernateException,SQLException, IllegalAccessException;
    public void saveOrUpdate(T obj) throws HibernateException,SQLException;
    public void delete(T obj)throws HibernateException,SQLException, IllegalAccessException;
}
